package com.study;

public class CarDemo {
    public static void main(String[] args) {
        CarClass car = new CarClass();
//        car.brand = "奔驰";
//        car.price = 299999;
//        car.color = "粉色";

        car.setBrand("奔驰");
        car.setPrice(2999999);
        car.setColor("粉色");

        System.out.println(car); // com.study.CarClass@6acbcfc0
        /*
            com.study.CarClass：全类名 = 包名 + 类名；
            @：分隔符
            6acbcfc0：十六进制的内存地址
         */

        System.out.println(car.getBrand());
        System.out.println(car.getPrice());
        System.out.println(car.getColor());
    }
}
